/*
 * clog_conf.h
 *
 *  Created on: 2012-8-12
 *      Author: lin
 */

#ifndef CLOG_CONF_H_
#define CLOG_CONF_H_

#include "def/defs.h"
#include "collection/array_list.h"
#include "collection/hash_map.h"

typedef struct {
    char file[MAXLEN_PATH + 1];
    char mtime[20 + 1];

    size_t buf_size_min;
    size_t buf_size_max;

    uint32_t file_perms;

    array_list_t *levels;
    array_list_t *formats;
    array_list_t *rules;
    int32_t seq_id;
} clog_conf_t;

clog_conf_t *clog_conf_new(const char* conf_file);
void clog_conf_free(clog_conf_t *conf);
clog_conf_t *clog_conf_dup(clog_conf_t *src);
#define clog_conf_get_seq_id(conf) (conf)->seq_id
#define clog_conf_set_seq_id(conf,id) (conf)->seq_id = (id)
#endif /* CLOG_CONF_H_ */
